var Happytalk=function(){"use strict";var t=function(){function t(){this._events={},this._events={}}return t.prototype.on=function(t,e){this._events[t]=this._events[t]||[],this._events[t].push(e)},t.prototype.emit=function(t,e){this._events[t]&&this._events[t].forEach((function(t){t(e)}))},t}(),e=function(){function t(){}return t.prototype.debounce=function(t,e){var i=void 0;return function(){i&&clearTimeout(i),i=setTimeout(t,e)}},t.getSiteUid=function(t){return t?t.split(",").reduce((function(t,e){var i=e.indexOf("=");if(i<0)return"";var o=e.slice(i+1);return e.startsWith("site_uid")?t+o:t}),""):""},t.getStorageValue=function(t,e){var i={},o=!!e&&""!==this.getSiteUid(e),a=["SelfCs-Client-Id_".concat(t),"happytalkio_userId_".concat(t),"happytalkio_jwtToken_".concat(t)],n=["happytalkio_ingRoomId_".concat(t),"happytalkio_lastChatListId_".concat(t)];return a.forEach((function(t){var e,o=null!==(e=localStorage.getItem(t))&&void 0!==e?e:"";try{o=JSON.parse(o)}catch(t){}i[t]=o})),n.forEach((function(e){var a,n=o?"".concat(e,"_").concat(i["happytalkio_userId_".concat(t)]):e,s=null!==(a=localStorage.getItem(n))&&void 0!==a?a:"";try{s=JSON.parse(s)}catch(t){}i[n]=s})),i},t}(),i=function(){return i=Object.assign||function(t){for(var e,i=1,o=arguments.length;i